%% Advanced reporting features
% by Jaromir Benes
%
% This mini-tutorial includes four m-files. One describes the use of
% ``long'' tables. The second describes how to align report objects
% horizontally. The third shows how to print model files in reports. The
% fourth shows how to change the appearance of various things in tables.

%% Check IRIS version

irisrequired 8.20120827;

%% Long tables
%
% This m-file shows some of the features and bug fixes relating to long
% tables, matrices and arrays. First, not only tables but also matrices and
% arrays can be now ``long'' meaning they can stretch over multiple pages.
% Second, you can place a one-row note at the foot of each of the mutliple
% pages (except the last one), e.g. to indicate that the table continues;
% this is a feature requested in Issue 15. Third, you can customise the
% format of captions, e.g. titles and subtitles.

% edit long_tables.m;
long_tables;

%% Aligned stuff
%
% In this m-file, we make tables, graphs, and matices aligned horizontally,
% and show how to create shared titles and subtitles.

% edit aligned_stuff.m;
aligned_stuff;

%% Model files in reports
%
% In this m-file, we print a simple model file in a report. The report
% features (optional) syntax highlighting and currently assigned parameter
% values.

% edit model_files.m;
model_files;

%% Table formats
%
% In this m-file, we look into how to customise the appearance of NaNs,
% Infs, and zeros in table data areas, and how to format subheadings and
% time series descriptions.

% edit table_formats.m;
table_formats;

%% Footnotes
%
% This m-file show how to use the option 'footnote=' to add footnotes to
% some of the report elements.

% edit footnotes.m;
footnotes;

%% User formatting
%
% This m-file illustrates the use of the option `'typeface'`. The option
% can be specified for some of the first-level elements, and allows to add
% LaTeX commands before that elements that will be applied to it and change
% possible its appearance (such as font size).

% edit user_typeface;
user_typeface;

%% User-defined columns in tables
%
% In this m-file, we show how to create tables with user-defined columns
% using the `'columnstruct'` option. The option is an alternative to the
% `'range'` option, and allows more flexibility in defining the content of
% tables.

% edit tables_with_user_columns;
tables_with_user_columns;

%% Use of \sprintf in conditional formats
% 
% In this m-file, we use the `\sprintf{FFFF}` command in conditional format
% structs to modify the way selected numeric entries are printed in tables
% or matrices.

% edit sprintf_in_condformat;
sprintf_in_condformat;

%% Compile PDFs
%
% The following commands have been used to create PDF versions of the m-files:

%{
latex.publish('read_me_first',[],'evalCode=',false);
latex.publish('long_tables');
latex.publish('aligned_stuff');
latex.publish('model_files');
latex.publish('table_formats');
latex.publish('footnotes');
latex.publish('user_typeface');
latex.publish('tables_with_user_columns');
latex.publish('sprintf_in_condformat');
%}
